Table of Contents Previous Section

What is self?

In WebScript, self is available in every method. It refers to the object (either the WOApplication object or the WOWebScriptComponentController object) associated with a script. When you send a message to self, you're telling the object associated with the script to perform a method that's implemented in the script. For example, suppose you have a script that implements the method giveMeARaise. From another method in the same script you could invoke giveMeARaise as follows:

[self giveMeARaise];

This tells the WOApplication or WOWebScriptComponentController object associated with the script to perform its giveMeARaise method.

Table of Contents Next Section